Skip to main content

SLAM_metadata_fields

Overview

Downloads detailed field definitions for all objects to table METADATA_FIELDS.

warning

The list of fields returned is subject to Salesforce permissions. Only the objects and fields the user has access to in Salesforce are returned.

Parameters

NameTypeDefaultDescription
@sObjectVARCHAR(120)NULLSpecific Salesforce object name to retrieve field metadata for. If NULL, retrieves fields for all objects
@exists_actionVARCHAR(20)NULLControls the behavior when the destination object METADATA_FIELDS already exists. If NULL, uses the value from SLAM_Settings.default_exists_action (defaulted to 'drop' during initial setup).

Valid options:

  • 'drop' - Drop the existing object and create a new one (default)
  • 'rename' - Rename the existing object by appending a timestamp suffix (format: _YYYYMMDDTHHMMSS_MMM)
  • 'fail' - Throws a SQL exception if the destination object already exists

Usage Examples

EXEC dbo.SLAM_metadata_fields;

SELECT * FROM METADATA_FIELDS;

With explicit exists action:

EXEC dbo.SLAM_metadata_fields
@exists_action = 'rename';